#include <stdio.h>

int a[5] = {1, 2, 3, 4, 5};  
int current[5];
int N = 5;
int M;

void combine(int start, int count) {
    if (count == M) {
        for (int i = 0; i < M; i++) {
            printf("%d ", current[i]);
        }
        printf("\n");
        return;
    }
    if (start >= N) {
        return;
    }
    current[count] = a[start];
    combine(start + 1, count + 1);
    combine(start + 1, count);
}

int main() {
    M = 3;
    combine(0, 0);  // 从索引0开始，初始已选0个
    return 0;
}